//
//  DrugWebViewController.m
//  TestARC
//
//  Created by wuxiaoquan on 12-10-11.
//
//

#import "DrugWebViewController.h"

@interface DrugWebViewController ()

@end

@implementation DrugWebViewController
@synthesize url,webView;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    [self loadWebPageWithString:self.url];
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
    self.webView = nil;
    self.url = nil;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

- (void)loadWebPageWithString:(NSString*)urlString
{
    if(urlString==nil)
    {
        return;
    }
    NSURL *mUrl =[NSURL URLWithString:urlString];
    NSURLRequest *request =[NSURLRequest requestWithURL:mUrl];
    [self.webView loadRequest:request];
}

@end
